@for(item in list){

@if(item.type == 1){
<div style="margin-bottom: 20px;">
    <div class="fold" style="display: flex;border: 1px solid #dddddd;align-items:center;">
        <div style="flex: 1;text-align: center">
            <div style="padding: 10px  15px;">
                <span style="color: #00A8CB;">${item.operationTime}</span>
            </div>
            <div class="doctorHide" style="padding: 10px  15px;border-top: 1px solid #dddddd">
                <span>${item.payServiceName}</span>
            </div>
        </div>
        <div style="flex: 6;border-right: 1px solid #dddddd;border-left: 1px solid #dddddd;">
            <div style="padding: 10px  15px;border: 1px solid #dddddd;background: #ebfaff;">
                <span>
                    <span>初诊病历</span><span> |</span>
                    <span>诊断：${item.diagnose}</span><span> |</span>
                    <span>治疗：${item.remedyPlan}</span>
                </span>
                <span style="float: right;width: 75px;color: #00A8CB;cursor:pointer" class="details">详情
                    <span style="vertical-align: middle;" class="glyphicon glyphicon-triangle-right"></span>
                    <span style="vertical-align: middle;display: none" class="glyphicon glyphicon-triangle-bottom"></span>
                </span>
            </div>
            <div style="padding: 10px  15px;"><span>主述：</span><span>${item.zhushu}</span></div>
        </div>
        <div style="flex: 1;text-align: center;">
            <div style="padding: 10px  15px;border: 1px solid #dddddd;background: #ebfaff;color: #00A8CB;border-left: none">
                <a href="javascript:;" style="margin-right: 25px;color: #00A8CB" onclick="CaseTableList.updateCase('${item.id}')">编辑</a>
                <a href="javascript:;" style="color: #00A8CB">删除</a>
            </div>
            <div class="doctorHide" style="padding: 10px  15px;"><span>医生：</span><span>${item.doctorId}</span></div>
        </div>
    </div>
    <div id="${item.id}" style="display: none" class="foldBox">
        <div style="display: flex;border: 1px solid #dddddd;border-top: none;">
            <div style="flex: 1;text-align: center;margin-top: 20px;color: #00A8CB;"><h3>${item.payServiceName}</h3></div>
            <div style="flex: 6;border-right: 1px solid #dddddd;border-left: 1px solid #dddddd">
                <ul style="padding-right: 15px;" class="clearfix ulBox">
                    @if(item.zhushu != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12"><span style="font-weight: bold;">主诉：</span><span>${item.zhushu}</span>
                        </div>
                    </li>
                    @}
                    @if(item.nowMedicalHistory != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12"><span style="font-weight: bold;">现病史：</span><span>${item.nowMedicalHistory}</span>
                        </div>
                    </li>
                    @}
                    @if(item.beforeMedicalHistory != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12"><span style="font-weight: bold;">既往史：</span><span>${item.beforeMedicalHistory}</span>
                        </div>
                    </li>
                    @}
                    <li class="row">
                        <div value="${item.id}1" id="${item.id}1"></div>
                    </li>
                    <li class="row">
                        <div value="${item.id}2" id="${item.id}2"></div>
                    </li>
                    <li class="row">
                        <div value="${item.id}3" id="${item.id}3"></div>
                    </li>
                    <li class="row">
                        <div value="${item.id}4" id="${item.id}4"></div>
                    </li>
                    <li class="row">
                        <div value="${item.id}5" id="${item.id}5"></div>
                    </li>
                    @if(item.doctorAdvice != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12">
                            <span style="font-weight: bold;">医嘱：</span><span>${item.doctorAdvice}</span>
                        </div>
                    </li>
                    @}
                    @if(item.remarkss != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12">
                            <span style="font-weight: bold;">备注：</span><span>${item.remarkss}</span>
                        </div>
                    </li>
                    @}
                    <li class="row" style="border: none">
                        <div class="col-sm-12" style="text-align: center">
                            <button type="button" style="background: white;border: 1px solid #cccccc" class="btn" onclick="CaseTableList.prints('${item.id}')">打印病历</button>
                        </div>
                    </li>
                </ul>
            </div>
            <div style="flex: 1">
                <h3 style="padding-left: 40px; margin: 20px 0">医生：${item.doctorId}</h3>
                <h3 style="padding-left: 40px; margin: 20px 0">护士：${item.nurseId}</h3>
            </div>
        </div>
    </div>
</div>
@}

@if(item.type == 2){
<div style="margin-bottom: 20px;">
    <div class="fold" style="display: flex;border: 1px solid #dddddd;align-items:center;">
        <div style="flex: 1;text-align: center">
            <div style="padding: 10px  15px;">
                <span style="color: #00A8CB;">${item.operationTime}</span>
            </div>
            <div class="doctorHide" style="padding: 10px  15px;border-top: 1px solid #dddddd">
                <span>${item.payServiceName}</span>
            </div>
        </div>
        <div style="flex: 6;border-right: 1px solid #dddddd;border-left: 1px solid #dddddd;">
            <div style="padding: 10px  15px;border: 1px solid #dddddd;background: #ebfaff;">
                <span>
                     <span>复诊病历</span>
                </span>
                <span style="float: right;width: 75px;color: #00A8CB;cursor:pointer" class="details">详情
                    <span style="vertical-align: middle;" class="glyphicon glyphicon-triangle-right"></span>
                    <span style="vertical-align: middle;display: none" class="glyphicon glyphicon-triangle-bottom"></span>
                </span>
            </div>
            <div style="padding: 10px  15px;"><span>复诊：</span><span>${item.zhushu}</span></div>
        </div>
        <div style="flex: 1;text-align: center;">
            <div style="padding: 10px  15px;border: 1px solid #dddddd;background: #ebfaff;color: #00A8CB;border-left: none">
                <a href="javascript:;" style="margin-right: 25px;color: #00A8CB" onclick="CaseTableList.updateCase('${item.id}')">编辑</a>
                <a href="javascript:;" style="color: #00A8CB">删除</a>
            </div>
            <div class="doctorHide" style="padding: 10px  15px;"><span>医生：</span><span>${item.doctorId}</span></div>
        </div>
    </div>
    <div id="${item.id}" style="display: none" class="foldBox">
        <div style="display: flex;border: 1px solid #dddddd;border-top: none;">
            <div style="flex: 1;text-align: center;margin-top: 20px;color: #00A8CB;"><h3>${item.payServiceName}</h3></div>
            <div style="flex: 6;border-right: 1px solid #dddddd;border-left: 1px solid #dddddd">
                <ul style="padding-right: 15px;" class="clearfix ulBox">
                    @if(item.zhushu != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12"><span style="font-weight: bold;">复诊：</span><span>${item.zhushu}</span>
                        </div>
                    </li>
                    @}
                    <li class="col-sm-12">
                        <div value="${item.id}1" id="${item.id}1"></div>
                    </li>
                    <li class="col-sm-12">
                        <div value="${item.id}2" id="${item.id}2"></div>
                    </li>
                    <li class="col-sm-12">
                        <div value="${item.id}3" id="${item.id}3"></div>
                    </li>
                    <li class="col-sm-12">
                        <div value="${item.id}4" id="${item.id}4"></div>
                    </li>
                    <li class="col-sm-12">
                        <div value="${item.id}5" id="${item.id}5"></div>
                    </li>
                    @if(item.doctorAdvice != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12">
                            <span style="font-weight: bold;">医嘱：</span><span>${item.doctorAdvice}</span>
                        </div>
                    </li>
                    @}
                    @if(item.remarkss != ""){
                    <li class="row" style="padding: 10px 0;border-bottom: 1px solid #dddddd">
                        <div class="col-sm-12">
                            <span style="font-weight: bold;">备注：</span><span>${item.remarkss}</span>
                        </div>
                    </li>
                    @}
                    <li class="row" style="border: none">
                        <div class="col-sm-12" style="text-align: center">
                            <button type="button" style="background: white;border: 1px solid #cccccc" class="btn" onclick="CaseTableList.printss('${item.id}')">打印病历</button>
                        </div>
                    </li>
                </ul>
            </div>
            <div style="flex: 1">
                <h3 style="padding-left: 40px; margin: 20px 0">医生：${item.doctorId}</h3>
                <h3 style="padding-left: 40px; margin: 20px 0">护士：${item.nurseId}</h3>
            </div>
        </div>
    </div>
</div>

@}


<script>
    $.ajax({
        type: "post",
        url: Feng.ctxPath + "/doctorLooked/getCaseData",
        dataType: "json",
        data: {
            "id": '${item.id}'
        },
        success: function (data) {
            var s1 = "";
            var s2 = "";
            var s3 = "";
            var s4 = "";
            var s5 = "";

            s1 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">口腔检查：</div>';
            for(var i=0 ; i<data.length ; i++){
                s1 += '<div class="col-sm-10"><div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                    '<input readonly="readonly" class="tool_ipt" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px" value="' + data[i].leftUp + '">' +
                    '<input readonly="readonly" class="tool_ipt" style="border-bottom: 1px solid black;padding-left: 4px" value="' + data[i].rightUp + '">' +
                    '<input readonly="readonly" class="tool_ipt" style="border-right: 1px solid black;text-align: right;padding-right: 4px" value="' + data[i].leftDown + '">' +
                    '<input readonly="readonly" class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '"></div>' +
                    '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div></div>';
            }
            s1 += '</div>';


            for(var i=0 ; i<data.length ; i++) {
                if (data[i].yaType == 1) {
                    if(data[i].remarks != ""){
                        s1 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                            '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">口腔检查：</div>' +
                            '<div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                            '<input readonly="readonly" class="tool_ipt" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px" value="' + data[i].leftUp + '">' +
                            '<input readonly="readonly" class="tool_ipt" style="border-bottom: 1px solid black;padding-left: 4px" value="' + data[i].rightUp + '">' +
                            '<input readonly="readonly" class="tool_ipt" style="border-right: 1px solid black;text-align: right;padding-right: 4px" value="' + data[i].leftDown + '">' +
                            '<input readonly="readonly" class="tool_ipt" style="padding-left: 4px" value="' + data[i].rightDown + '"></div>' +
                            '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>' +
                            '</div>'
                    }
                }else if(data[i].yaType == 2){
                    if(data[i].remarks != ""){
                        s2 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                            '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">辅助检查：</div>' +
                            '<div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftUp + '" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightUp + '" style="border-bottom: 1px solid black;padding-left: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftDown + '" style="border-right: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightDown + '" style="padding-left: 4px"></div>' +
                            '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>' +
                            '</div>'
                    }
                }else if(data[i].yaType == 3){
                    if(data[i].remarks != ""){
                        s3 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                            '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">诊断：</div>' +
                            '<div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftUp + '" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightUp + '" style="border-bottom: 1px solid black;padding-left: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftDown + '" style="border-right: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightDown + '" style="padding-left: 4px"></div>' +
                            '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>' +
                            '</div>'
                    }
                }else if(data[i].yaType == 4){
                    if(data[i].remarks != ""){
                        s4 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                            '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">治疗计划：</div>' +
                            '<div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftUp + '" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightUp + '" style="border-bottom: 1px solid black;padding-left: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftDown + '" style="border-right: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightDown + '" style="padding-left: 4px"></div>' +
                            '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>' +
                            '</div>'
                    }
                }else if(data[i].yaType == 5){
                    if(data[i].remarks != ""){
                        s5 += '<div class="clearfix" style="padding: 10px 0;border-bottom: 1px solid #dddddd">' +
                            '<div class="col-sm-2 typeStyle" style="font-weight: bold;width: 10%">处置：</div>' +
                            '<div class="col-sm-2" style="height:50px;display: flex;flex-wrap:wrap;">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftUp + '" style="border-right: 1px solid black;border-bottom: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightUp + '" style="border-bottom: 1px solid black;padding-left: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].leftDown + '" style="border-right: 1px solid black;text-align: right;padding-right: 4px">' +
                            '<input readonly="readonly" class="tool_ipt" value="' + data[i].rightDown + '" style="padding-left: 4px"></div>' +
                            '<div class="col-sm-8 typeStyle">' + data[i].remarks + '</div>' +
                            '</div>'
                    }
                }
            }
            $("div[value='${item.id}1']").html(s1);
            $("div[value='${item.id}2']").html(s2);
            $("div[value='${item.id}3']").html(s3);
            $("div[value='${item.id}4']").html(s4);
            $("div[value='${item.id}5']").html(s5);

        },
        error: function (data) {
            alert('内部故障!');
        }
    });
</script>

@}








